<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EOS.IO: contracts/eoslib/math.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN3.0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_ae9b15dd87e066e1908bbd90e8f38627.html">contracts</a></li><li class="navelem"><a class="el" href="dir_3fea0bf1ce879ce73e6ecec98007efcd.html">eoslib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">math.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="math_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="system_8h.html">eoslib/system.h</a>&gt;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="group__mathcapi.html#ga61d571f58c24fb4663cc3729f3d5613e">multeq_i128</a>( <a class="code" href="group__types.html#ga396787e5ec029b1205bd3e4cd9763e7d">uint128_t</a>* <span class="keyword">self</span>, <span class="keyword">const</span> <a class="code" href="group__types.html#ga396787e5ec029b1205bd3e4cd9763e7d">uint128_t</a>* other );</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="group__mathcapi.html#gad70a23703654281749410aef05c85c74">diveq_i128</a> ( <a class="code" href="group__types.html#ga396787e5ec029b1205bd3e4cd9763e7d">uint128_t</a>* <span class="keyword">self</span>, <span class="keyword">const</span> <a class="code" href="group__types.html#ga396787e5ec029b1205bd3e4cd9763e7d">uint128_t</a>* other );</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> <a class="code" href="group__mathcapi.html#ga7372b74e4cb87455342d39bdf3724811">double_add</a>(<a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> a, <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> b);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> <a class="code" href="group__mathcapi.html#ga6390d36d23bd89bcd9bcf52385ba88f2">double_mult</a>(<a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> a, <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> b);</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;  <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> <a class="code" href="group__mathcapi.html#gad67af06a6b0e9dbbf3be05d6bf99257c">double_div</a>(<a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> a, <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> b);</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  <a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> <a class="code" href="group__mathcapi.html#ga68d359e670da751723bf3d78ff759614">double_lt</a>(<a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> a, <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> b);</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;  <a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> <a class="code" href="group__mathcapi.html#ga8911bd5a24e0d8287d6b3d5a81500e6a">double_eq</a>(<a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> a, <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> b);</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;  <a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> <a class="code" href="group__mathcapi.html#gab60e3f0c6651ad497f6665e032e39f6a">double_gt</a>(<a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> a, <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> b);</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;  <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> <a class="code" href="group__mathcapi.html#ga1388e46084036133e57508c18590b1ed">double_to_i64</a>(<a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> a);</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;  <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> <a class="code" href="group__mathcapi.html#gaec506d4ee77526e67ab5f2a8ef54f2b5">i64_to_double</a>(<a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> a);</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;} <span class="comment">// extern &quot;C&quot;</span></div><div class="ttc" id="group__mathcapi_html_gad67af06a6b0e9dbbf3be05d6bf99257c"><div class="ttname"><a href="group__mathcapi.html#gad67af06a6b0e9dbbf3be05d6bf99257c">double_div</a></div><div class="ttdeci">uint64_t double_div(uint64_t a, uint64_t b)</div><div class="ttdoc">Division between two double. </div></div>
<div class="ttc" id="group__types_html_gaaa5d1cd013383c889537491c3cfd9aad"><div class="ttname"><a href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a></div><div class="ttdeci">unsigned long long uint64_t</div><div class="ttdef"><b>Definition:</b> types.h:18</div></div>
<div class="ttc" id="group__mathcapi_html_ga6390d36d23bd89bcd9bcf52385ba88f2"><div class="ttname"><a href="group__mathcapi.html#ga6390d36d23bd89bcd9bcf52385ba88f2">double_mult</a></div><div class="ttdeci">uint64_t double_mult(uint64_t a, uint64_t b)</div><div class="ttdoc">Multiplication between two double. </div></div>
<div class="ttc" id="group__mathcapi_html_ga8911bd5a24e0d8287d6b3d5a81500e6a"><div class="ttname"><a href="group__mathcapi.html#ga8911bd5a24e0d8287d6b3d5a81500e6a">double_eq</a></div><div class="ttdeci">uint32_t double_eq(uint64_t a, uint64_t b)</div><div class="ttdoc">Equality check between two double. </div></div>
<div class="ttc" id="group__mathcapi_html_ga61d571f58c24fb4663cc3729f3d5613e"><div class="ttname"><a href="group__mathcapi.html#ga61d571f58c24fb4663cc3729f3d5613e">multeq_i128</a></div><div class="ttdeci">void multeq_i128(uint128_t *self, const uint128_t *other)</div><div class="ttdoc">Multiply two 128 unsigned bit integers. Throws exception if pointers are invalid. ...</div></div>
<div class="ttc" id="group__mathcapi_html_gaec506d4ee77526e67ab5f2a8ef54f2b5"><div class="ttname"><a href="group__mathcapi.html#gaec506d4ee77526e67ab5f2a8ef54f2b5">i64_to_double</a></div><div class="ttdeci">uint64_t i64_to_double(uint64_t a)</div><div class="ttdoc">Convert 64 bit unsigned integer to double (interpreted as 64 bit unsigned integer) ...</div></div>
<div class="ttc" id="group__types_html_ga06896e8c53f721507066c079052171f8"><div class="ttname"><a href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a></div><div class="ttdeci">unsigned long uint32_t</div><div class="ttdef"><b>Definition:</b> types.h:19</div></div>
<div class="ttc" id="group__mathcapi_html_gad70a23703654281749410aef05c85c74"><div class="ttname"><a href="group__mathcapi.html#gad70a23703654281749410aef05c85c74">diveq_i128</a></div><div class="ttdeci">void diveq_i128(uint128_t *self, const uint128_t *other)</div><div class="ttdoc">Divide two 128 unsigned bit integers and throws an exception in case of invalid pointers. </div></div>
<div class="ttc" id="group__mathcapi_html_gab60e3f0c6651ad497f6665e032e39f6a"><div class="ttname"><a href="group__mathcapi.html#gab60e3f0c6651ad497f6665e032e39f6a">double_gt</a></div><div class="ttdeci">uint32_t double_gt(uint64_t a, uint64_t b)</div><div class="ttdoc">Greater than comparison between two double. </div></div>
<div class="ttc" id="group__mathcapi_html_ga7372b74e4cb87455342d39bdf3724811"><div class="ttname"><a href="group__mathcapi.html#ga7372b74e4cb87455342d39bdf3724811">double_add</a></div><div class="ttdeci">uint64_t double_add(uint64_t a, uint64_t b)</div><div class="ttdoc">Addition between two double. </div></div>
<div class="ttc" id="system_8h_html"><div class="ttname"><a href="system_8h.html">system.h</a></div></div>
<div class="ttc" id="group__types_html_ga396787e5ec029b1205bd3e4cd9763e7d"><div class="ttname"><a href="group__types.html#ga396787e5ec029b1205bd3e4cd9763e7d">uint128_t</a></div><div class="ttdeci">unsigned __int128 uint128_t</div><div class="ttdef"><b>Definition:</b> types.h:17</div></div>
<div class="ttc" id="group__mathcapi_html_ga68d359e670da751723bf3d78ff759614"><div class="ttname"><a href="group__mathcapi.html#ga68d359e670da751723bf3d78ff759614">double_lt</a></div><div class="ttdeci">uint32_t double_lt(uint64_t a, uint64_t b)</div><div class="ttdoc">Less than comparison between two double. </div></div>
<div class="ttc" id="group__mathcapi_html_ga1388e46084036133e57508c18590b1ed"><div class="ttname"><a href="group__mathcapi.html#ga1388e46084036133e57508c18590b1ed">double_to_i64</a></div><div class="ttdeci">uint64_t double_to_i64(uint64_t a)</div><div class="ttdoc">Convert double to 64 bit unsigned integer. </div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
